<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var areasAndChannels = [{
            "areas": [{
                "areaId": "22313",
                "areaLayer": 2,
                "areaParentId": "19860"
            }, {
                "areaId": "22709",
                "areaLayer": 2,
                "areaParentId": "19860"
            }],
            "channels": [3, 4, 5]
        }, {
            "areas": [{
                "areaId": "22313",
                "areaLayer": 2,
                "areaParentId": "19860"
            }],
            "channels": [2, 4, 5]
        }]
        areasAndChannels.map(function(item,index){
                // console.log(item);
                var childChannel=item;
                // console.log(childChannel);
                // console.log(childChannel.areas[0].areaId);
                // if(childChannel.areas[0].areaId=="22313"){
                //     console.log("相同的id")
                // }
                console.log(childChannel.areas[0]);
                var aaa=childChannel.areas[0];
                // childChannel.areas[0].some(function(items,indexs){
                //        return items
                // })
                console.log(aaa);
                // childChannel.areas[0].areaId.some(function(items,indexs){
                //     console.log(items)
                // })
        })
    </script>
</body>

</html>